package com.my.mall.manage.user.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.my.mall.manage.user.dao.UserManageDao;
import com.my.mall.manage.user.vo.MangerInfoVo;
import com.my.mall.manage.user.vo.UserInfoVo;

@Service
public class UserManageService {
	@Autowired
	UserManageDao userManageDao;

	public List<UserInfoVo> selectUserCount() {
		return userManageDao.selectUserCount();
	}

	public List<UserInfoVo> selectUserList(int iDisplayStart, int iDisplayLength) {
		return userManageDao.selectUserList(iDisplayStart, iDisplayLength);
	}

	public int update(int id, int state) {
		return userManageDao.update(id, state);
	}

	public UserInfoVo getUser(int id) {
		return userManageDao.getUser(id);
	}
	
	public UserInfoVo getUserByUserName(String UserName) {
		return userManageDao.getUserByUserName(UserName);
	}
	
	public MangerInfoVo getMangerInfo(int id) {
		return userManageDao.getMangerInfo(id);
	}
	
	public int modifyUserPassword(MangerInfoVo mangerInfoVo) {
		return userManageDao.modifyUserPassword(mangerInfoVo);
	}

}